#include "Domain.h"
#include <memory>
int main()
{
    std::shared_ptr<RectangleDomain> pd(new RectangleDomain(),std::default_delete<RectangleDomain>());
    pd ->LeftBottomPoint() = {0,0};
    pd ->RightBottomPoint() = {1,0};
    pd ->RightTopPoint() = {1,1};
    pd ->LeftTopPoint() = {0,1};
    std::cout << pd ->LeftBottomPoint() << std::endl; 
    std::cout << pd -> RightTopPoint() << std::endl;
    std::cout << (*pd)[1] << std::endl;
    std::cout << (*pd)[3] << std::endl;
    std::vector<Point<2>> p({{0,1},{0,0}});
    Point<2> a({0,0.9});
    Boundary<2> B(p);
    if(B.is_on_boundary(a))
        std::cout << "is on this boundry" << std::endl;
    else
    {
        std::cout << "no on this boundary" << std::endl;
    }
    
    Boundary<2> A = pd->boundary(3);
    if(A.is_on_boundary(a))
        std::cout << "is on this boundry" << std::endl;
    else
    {
        std::cout << "no on this boundary" << std::endl;
    }
    return 0;
}